/**
 * fileName: MessageUtil.java
 *     Date: 2012-5-27
 **/
package com.stranger.common.util;






import com.stranger.common.bean.MessageCode;

/**
 * @作者 stranger.lin
 *
 * @时间 2012-5-27
 */
public class MessageUtil {
	
	private static MessageCode msgCode=new MessageCode();
	
	private static final String INITMSGCODE="com.stranger.common.util.InitMsgCode"; 
	
	public static  MessageCode msg(String msg){
		InitMsgCode initMsgCode=(InitMsgCode)BeanUtils.getApplicationContext().getBean(INITMSGCODE);
		
		if (msgCode!=null) {
			msgCode=(MessageCode)initMsgCode.getMessages().get(msg);
		}
		
		
		
		return msgCode;
	}

	
	
}
